/*
 * IWarteschlange.java
 * 
 *  author: Daniel Rudigier
 *    date: 23.05.2008
 * 
 * 
 */
package ocumed.teams;

import java.util.Set;
import java.util.TreeSet;


/**
 * @author Daniel Rudigier
 *
 */
public interface IWarteschlange {

    /**
     * enqueue a patient
     * 
     * @param p
     * @return the new position to be stored
     */
    public abstract IWarteposition einreihen(IPatient p);

    /**
     * dequeue a patient
     * 
     * @param p
     * @return the affected position to be deleted
     */
    public abstract IWarteposition ausreihen(IPatient p);

    /**
     * reassign position in queue
     * 
     * @param p
     * @param nachVorne
     * @param maximal
     * @return the affected positions, to be updated (in common: 2)
     */
    public abstract IWarteposition[] position(IPatient p, boolean nachVorne, boolean maximal);

    /**
     * @return the queue as a set
     */
    public abstract TreeSet<IWarteposition> getWartepositionen();

    /**
     * @param wartepositions
     */
    public abstract void setWartepositionen(Set<IWarteposition> wartepositions);

}